﻿using System;
using System.ComponentModel;

namespace OpenNETCF
{
    public interface IDecodeControl : IComponent, IDisposable
    {
        event DecodeEventHandler DecodeEvent;

        int AimerTimeout { get; set; }
        bool AimIDDisplay { get; set; }
        bool AutoLEDs { get; set; }
        bool AutoScan { get; set; }
        bool CodeIDDisplay { get; set; }
        bool ModifierDisplay { get; set; }
        TriggerKeyEnum TriggerKey { get; set; }
        AudioDevice AudioMode { get; set; }
        bool AutoSounds { get; set; }
        bool ContinuousScan { get; set; }
        int DecodeAttemptLimit { get; set; }
        DecodeMode DecodeMode { get; set; }
        ScanLightsMode LightsMode { get; set; }
        int LinearRange { get; set; }
        int PrintWeight { get; set; }
        int ScanTimeout { get; set; }
        int SearchTimeLimit { get; set; }
        bool TraceMode { get; set; }
        bool VideoReverse { get; set; }
        bool VirtualKeyMode { get; set; }
        VirtualKeyTermEnum VirtualKeyTerm { get; set; }

        void CancelScanBarcode();
        void Clear();
        void ScanBarcode();
        void ScanBarcode(bool bNonBlocking);
        bool TriggerKeyIsDown();
        void Connect();
        void Disconnect();
        void EnableSymbology(SymID sym, bool enable);

        /////////

        //void CaptureIQImage(IntellImgDesc imgDesc);

        //protected byte[] bIqData;
        //protected Result decResultCode;
        //protected IPdtMsgHandler msgWin;
        //protected Control savedFocus;

        //public DecodeBase();

        //public virtual bool Connected { get; }
        //public virtual byte[] IqImageData { get; }
        //public virtual int VirtualKeyDest { get; }

        //protected void CaptureFocus();
        //public virtual void Connect();
        //public virtual void Disconnect();
        //protected override void Dispose(bool disposing);
        //public virtual void Enable2DPQA(bool enable);
        //public virtual void EnableAimer(bool enable);
        //public virtual void EnableIllumination(bool enable);
        //public virtual void EnableSymbology(SymID sym, bool enable);
        //protected virtual bool ExtractWavResources();
        //public virtual string GetAPIRevision();
        //public virtual void GetDecodeCenteringWindow(SetupType setup, ref bool enabled, Rect rect);
        //public virtual string GetDecoderRevision();
        //public virtual EngineID GetEngineID();
        //public virtual EngineType GetEngineType();
        //public virtual string GetErrorMessage(Result error);
        //public virtual ExposureMode GetExposureMode();
        //public virtual void GetExposureSettings(int[] pArray, int arrayLength);
        //protected Image GetImageFromBuffer(int width, int height, byte[] uchImgData);
        //public virtual int GetLastDecodeTime();
        //public virtual Image GetLastImage(ref int iSize, LastImageAttributes LastImgAtt);
        //public virtual void GetLastImageSize(ref short Columns, ref short Rows, ref int Size);
        //public virtual int GetMaxMessageChars();
        //public virtual string GetScanDriverRevision();
        //public virtual void GetSetupOCR(ref OCRMode font, ref string template, ref string groupG, ref string groupH, ref string checkChar);
        //public virtual bool IsSymbologyEnabled(SymID symID);
        //protected void RestoreFocus();
        //public virtual void SaveLastImage(SaveImageFormat imageFormat);
        //public virtual bool ScanInProgress();
        //public virtual void SetExposureMode(ExposureMode ExpMode);
        //public virtual void SetExposureSettings(int[] pArray, int arrayLength);
        //protected void SetMsgHandler(IPdtMsgHandler win);
        //public virtual void SetSymbologyDefaults(SymID sym);
        //public virtual void SetupDecodeCenteringWindow(SetupType setup, ref bool enabled, Rect rect);
        //public virtual void SetupOCR(OCRMode font, string template, string groupG, string groupH, string checkChar);
        //public virtual void SetVKWindow(TextBox objTextbox);
        //public virtual void WaitForDecode(int timeout, byte[] message, ref byte codeID, ref byte aimID, ref byte symModifier, ref int length, int nKey);
        //protected Result WriteDecodeOptions();
    }
}
